package com.itwn.portal.service;

import com.itwn.portal.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itwn.portal.model.vo.LoginRequest;
import com.itwn.portal.model.vo.RegisterRequest;
import com.itwn.portal.model.vo.UserVo;
import org.springframework.http.ResponseEntity;

/**
* @author 61073
* @description 针对表【t_user】的数据库操作Service
* @createDate 2024-12-10 15:34:38
*/
public interface UserService extends IService<User> {

    /**
     * 用户登录
     */
    UserVo login(LoginRequest param);

    User findById(long id);

    UserVo smsLogin(LoginRequest param);


    /**
     * 判断账户名是否存在
     * @param account
     * @return
     */
    boolean isAccountExist(String account);

    /**
     * 判断电话是否存在
     * @param mobile
     * @return
     */
    boolean isMobileExist(String mobile);

    /**
     * 注册成功，返回新的用户对象
     */
    UserVo register(RegisterRequest request);
}
